/* 人生倒计时页面样式 - 优化版 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50, #4a235a);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 返回导航 */
.nav-back {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 头部 */
header {
    text-align: center;
    padding: 50px 0 30px;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #a1c4fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* 设置面板 */
.settings-panel {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-panel h3 {
    margin-bottom: 20px;
    color: #a1c4fd;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.setting-item span {
    font-size: 12px;
    color: #fad0c4;
    font-weight: 600;
}

/* 仪表板 */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header i {
    font-size: 1.8rem;
    margin-right: 15px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
}

/* 倒计时显示 */
.countdown {
    text-align: center;
    margin: 30px 0;
}

.countdown-number {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff9a9e, #a1c4fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

.countdown-label {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 5px 0;
    color: #ff9a9e;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    color: #2c3e50;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn-alt {
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
}

/* 书籍容器 */
.books-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 25px 0;
    justify-content: center;
    padding: 20px;
    min-height: 150px;
}

.book {
    width: 80px;
    height: 110px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    border-radius: 6px;
    position: relative;
    transform: rotate(2deg);
    box-shadow: 3px 3px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    cursor: pointer;
    margin: 5px;
}

.book:hover {
    transform: rotate(0) scale(1.15);
    z-index: 10;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.4);
}

.book:nth-child(2n) {
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
    transform: rotate(-1deg);
}

.book:nth-child(3n) {
    background: linear-gradient(45deg, #d4fc79, #96e6a1);
    transform: rotate(3deg);
}

.book:nth-child(4n) {
    background: linear-gradient(45deg, #ff9a9e, #ffb347);
    transform: rotate(1.5deg);
}

.book:nth-child(5n) {
    background: linear-gradient(45deg, #c471ed, #f64f59);
    transform: rotate(-2deg);
}

.book-title {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.7rem;
    color: #000;
    font-weight: bold;
    padding: 0 4px;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

/* 洞察区域 */
.insights {
    margin-top: 30px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border-left: 4px solid #a1c4fd;
}

.insights-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #a1c4fd;
}

/* 黄金时间区域 */
.golden-age-section {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 15px;
    border-left: 4px solid rgba(255, 107, 107, 0.8);
}

.golden-age-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

@media (max-width: 768px) {
    .golden-age-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.golden-age-chart {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.golden-age-info {
    padding: 20px;
}

.golden-age-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.golden-stat {
    background: rgba(255, 107, 107, 0.15);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.golden-stat .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.golden-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 107, 107, 1);
    margin-bottom: 5px;
}

.golden-stat .stat-percent {
    font-size: 0.9rem;
    color: rgba(255, 107, 107, 1);
    font-weight: 600;
}

.highlight {
    color: #fad0c4;
    font-weight: 700;
}

/* AI区域 */
.ai-section {
    margin-top: 50px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 30px;
    border-top: 3px solid #00adb5;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.ai-icon {
    font-size: 2.5rem;
    color: #00adb5;
}

.ai-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.ai-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .ai-content {
        grid-template-columns: 1fr;
    }
}

.ai-pros, .ai-cons {
    padding: 20px;
    border-radius: 10px;
}

.ai-pros {
    background: rgba(0, 173, 181, 0.15);
    border: 1px solid rgba(0, 173, 181, 0.3);
}

.ai-cons {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.ai-list {
    list-style-type: none;
    margin-top: 15px;
}

.ai-list li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    display: flex;
    gap: 10px;
}

.ai-list li i {
    color: #00adb5;
    min-width: 20px;
}

.ai-cons .ai-list li i {
    color: #ff6b6b;
}

.conclusion {
    margin-top: 30px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 详细数据表格 */
.details-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 25px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.details-section h3 {
    margin-bottom: 20px;
    color: #a1c4fd;
    font-size: 1.4rem;
}

.data-table {
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    background: rgba(161, 196, 253, 0.2);
    font-weight: bold;
    color: #a1c4fd;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-back {
        position: relative;
        margin-bottom: 20px;
    }
    
    header {
        padding: 20px 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .setting-item {
        gap: 10px;
    }
    
    .setting-item input[type="range"] {
        height: 8px; /* 增加滑块高度，便于触摸 */
    }
    
    .setting-item input[type="range"]::-webkit-slider-thumb {
        width: 24px; /* 增大滑块拇指，便于触摸 */
        height: 24px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .container {
        padding-bottom: 80px; /* 为底部导航留出空间 */
    }
    
    .countdown-number {
        font-size: 3rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.settings-panel,
.ai-section,
.details-section {
    animation: fadeIn 0.6s ease-out;
} 
/* 智能助手悬浮按钮 */
.assistant-floating-btn {
    position: fixed;
    right: 30px;
    bottom: 140px;
    background: linear-gradient(45deg, #00d4aa, #a1c4fd);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 999;
}

.assistant-floating-btn:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.4);
    background: linear-gradient(45deg, #00e6c0, #b1d1ff);
    text-decoration: none;
    color: white;
}

.assistant-floating-btn i {
    animation: assistantPulse 2s infinite;
}

@keyframes assistantPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 1024px) {
    .assistant-floating-btn {
        right: 20px;
        bottom: 140px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .assistant-floating-btn {
        right: 15px;
        bottom: 130px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .assistant-floating-btn {
        right: 15px;
        bottom: 120px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
